<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    

    <style>
        body{

            height: 1000px;
        }
        div{
            width: 100px;
            height: 100px;
            background-color: #891a1a;
            margin-top: 500px;
        }
        
    </style>


</head>
<body>
    <div >hahaha</div>

    <script>
        // window.addEventListener("scroll",function(){
        //     let n=document.documentElement.scrollTop;
        //     if(n>=100){
        //         document.querySelector("div").style.backgroundColor="red";
        //     }else{
        //         document.querySelector("div").style.backgroundColor="#891a1a";
        //     }
        // })
        let time=new Date();
        console.log(time.getFullYear());
        console.log(time.getMonth()+1);
        console.log(time.getDate());


    </script>

    
</body>
</html>